//
//  FWLoopViewLayout.swift
//  PicturesLooper
//
//  Created by 范伟 on 16/3/13.
//  Copyright © 2016年 FanWei. All rights reserved.
//

import UIKit

class FWLoopViewLayout: UICollectionViewFlowLayout {

    override func prepareLayout() {
        super.prepareLayout()
        // 此方法被调用的时候 collectionView 的大小已经被设置完成
        print(collectionView)
        itemSize = (collectionView?.bounds.size)!
        minimumInteritemSpacing = 0
        minimumLineSpacing = 0
        scrollDirection = .Horizontal
        
        collectionView?.bounces = false
        collectionView?.pagingEnabled = true
        collectionView?.showsHorizontalScrollIndicator = false
    }
}
